package com.ruoyi.teaching.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.teaching.mapper.OrdersMapper;
import com.ruoyi.teaching.domain.Orders;
import com.ruoyi.teaching.service.IOrdersService;

/**
 * 订单信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-08
 */
@Service
public class OrdersServiceImpl implements IOrdersService 
{
    @Autowired
    private OrdersMapper ordersMapper;

    /**
     * 查询订单信息
     * 
     * @param oId 订单信息主键
     * @return 订单信息
     */
    @Override
    public Orders selectOrdersByOId(Long oId)
    {
        return ordersMapper.selectOrdersByOId(oId);
    }

    /**
     * 查询订单信息列表
     * 
     * @param orders 订单信息
     * @return 订单信息
     */
    @Override
    public List<Orders> selectOrdersList(Orders orders)
    {
        return ordersMapper.selectOrdersList(orders);
    }

    /**
     * 新增订单信息
     * 
     * @param orders 订单信息
     * @return 结果
     */
    @Override
    public int insertOrders(Orders orders)
    {
        return ordersMapper.insertOrders(orders);
    }

    /**
     * 修改订单信息
     * 
     * @param orders 订单信息
     * @return 结果
     */
    @Override
    public int updateOrders(Orders orders)
    {
        return ordersMapper.updateOrders(orders);
    }

    /**
     * 批量删除订单信息
     * 
     * @param oIds 需要删除的订单信息主键
     * @return 结果
     */
    @Override
    public int deleteOrdersByOIds(Long[] oIds)
    {
        return ordersMapper.deleteOrdersByOIds(oIds);
    }

    /**
     * 删除订单信息信息
     * 
     * @param oId 订单信息主键
     * @return 结果
     */
    @Override
    public int deleteOrdersByOId(Long oId)
    {
        return ordersMapper.deleteOrdersByOId(oId);
    }
}
